<template>
	<view>
		<web-view :src = 'urls' style="width: 100%; height: 100%;"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				urls:'',
				back:false
			}
		},
		onLoad(e) {
			if(e.webid){
			this.urls ='https://v2.think-er.vip/v1/paySDOrder?id='+e.webid;
			// this.urls ='http://csnft.zyrnft.com/v1/paySDOrder?id='+e.webid;			
			this.back=false
			}
			if(e.orderSn){
				this.urls ='https://v2.think-er.vip/v1/PayRecharge?ordersn='+e.orderSn;
				// this.urls ='http://csnft.zyrnft.com/v1/PayRecharge?ordersn='+e.orderSn;
			this.back=true
			}
			// var currentWebview = this.$scope.$getAppWebview().children()[0];
			// currentWebview.addEventListener('loaded', function() {
			// 	console.log("111111")
			// 	uni.navigateBack();
			// }, false);
			// setTimeout(function(){uni.navigateBack();},1000);
		},
		methods: {
		
			onBackPress(e) {
			    console.log(e);
				if(this.back){
				uni.redirectTo({
					url:'/pages/wallet/myPurse'
				})}else{
					uni.redirectTo({
						url:'/pages/Order/index'
					})
				}
			    return true;//阻止默认返回行为
			},
		}
	}
</script>

<style>

</style>
